package com.itouchtv.yang.core.tools;


import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.Objects;

public class ClassPath {
    private static String classPath;

    public static String getClassPath(){
        if (Objects.isNull(classPath)|| Objects.equals(classPath, "")){
            String path = Thread.currentThread().getContextClassLoader().getResource("").getPath();
            try {
                URLDecoder.decode(path,"UTF-8");
            } catch (UnsupportedEncodingException e) {
                e.printStackTrace();
            }
//            classPath = path.substring(1,path.length());
            classPath = path;
        }
        return classPath;
    }
}
